import { FlowToBot } from '../../../../src/js/FlowToBot'

# Audio

The Audio bubble block allows you to play a recorded audio to your user. You can upload an audio file or directly paste a URL.

<FlowToBot
  flow={
    <img
      src="/img/blocks/bubbles/audio/editor.png"
      width="100%"
      style={{ maxWidth: '400px' }}
      alt="Audio bubble"
    />
  }
  bot={
    <video controls width="100%" style={{ maxWidth: '400px' }}>
      <source src="/img/blocks/bubbles/audio/bot.mp4" type="video/mp4" />
    </video>
  }
/>

## Troobleshooting

### The first audio bubble is not autoplaying

That is expected. Most web browser have a policy that prevents audio from playing automatically. The user needs to interact with the page before the audio can be played.

### The audio is not playing on iOS / Safari

It most likely means that your audio file is malformed. Depending on where the file comes from, you need to make sure the encoding is done correctly. To check if the file is correctly encoded you should be able to download it and play the file locally on your computer.
